<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>希望清单-杨卜妮</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <style type="text/css">
        /*全局样式*/
        *{
            margin:0;
            padding:0;
        }
        html,body{
            width:100%;
            height:100%;
        }
        .wrapper{
            display: flex;
            flex-direction: column;
            width:100%;
            height:100%;
        }

        /*头部样式*/
        header h1{
            background: #0f4d92;
            color:#ffffff;
            padding:5px;
            text-align: center;
            text-shadow: 1px 1px 5px #000000;
        }
        nav{
            background: #686868;
            height:40px;
        }
        nav ul {
            list-style: none;
            text-align: center;

        }
        nav ul li{
            display: inline;
        }
        nav ul li a{
            display: inline-block;
            text-decoration: none;
            color:#fff;
            background: #444444;
            padding:5px 10px;
            margin:5px 10px;
            border-radius: 10px;
        }
        a.active{
            color:#0099CC;
            background: #222222;
            margin-top: 1px;
        }
        main{
            flex: 1;
        }
        /*表单内容样式*/
        #addTask{
            display: none;
            margin-top: 15px;
        }
        #addTask form{
            margin: 0 10px;
        }
        #addTask form *{
            width:100%;
            font-size: 1.1em;
        }
        #addTask form label {
            padding: 10px 0 5px 0;
            font-weight: bold;
        }
        #addTask form textarea,input{
            outline: 0;
            border: 0.5px solid #444;
            border-radius: 5px;
            padding: 5px 15px;
            box-sizing: border-box;
            margin-top: 6px;
        }
        #addTask form button {
            padding: 10px;
            font-weight: bold;
            background: #724bbb;
            border-radius: 5px;
            cursor: pointer;
            margin-top: 15px;
            color: #fff;
            border: 0;
        }

        /* 表格样式 */
        #taskList table{
            border-collapse: collapse;
            margin: 15px auto;
            width: 96%;
            font-size: 12px;
            box-sizing: border-box;
        }
        #taskList table th{
            font-size: 14px;
        }
        #taskList table td,th{
            border: 1px solid #666;
            padding: 5px 10px;
            min-width: 100px;
            box-sizing: border-box;
        }
        #taskList table td:nth-child(3),th:nth-child(3){
            min-width: 80px;
            text-align: center;
        }
        #taskList table th{
            background-color: #888;
            color: #fff;
        }
        #taskList table button{
            padding: 0 5px;
            border-radius: 5px;
            outline: 0;
            border: 1px solid #999;
        } 
    </style>
</head>
<body>
<div class="wrapper">
    <!-- 定义网页的头部 -->
    <header>
        <h1>希望清单</h1>
    </header>

    <!-- 定义导航 -->
    <nav>
        <ul>
            <li><a href="javascript:;" class="active">任务列表</a></li>
            <li><a href="javascript:;">添加任务</a></li>
        </ul>
    </nav>
    <main>
        <!-- 任务列表 -->
        <section id="taskList" class="active">
            <table>
                <thead>
                    <tr>
                        <th>日期</th>
                        <th>内容</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
        </section>

        <!-- 添加任务 -->
        <section id="addTask">
            <form>
                <label>
                    内容
                    <textarea id="content"></textarea>
                </label>
                <label>
                    日期
                    <input  id="date" type="date" />
                </label>
                <button id="submit" type="button">提交</button>
            </form>
        </section>
    </main>
    
</div>
<script src="./希望清单.js"></script>
</body>
</html>
